import request from '@/utils/request'

export const getList = (params) => {
    return request({
      url: 'Supplier/index',
      method: 'get',
      params
    })
  }

  /* 新增供应商
  * @param  data
  */
 export const add = (data) => {
   return request({
     url: 'Supplier/add',
     method: 'post',
     data
   })
 }

 /**
 * 修改
 * @param  data
 */
export const edit = (data) => {
    return request({
      url: 'Supplier/edit',
      method: 'post',
      data
    })
  }

  /**
 * 删除
 * @param  id
 */
export const del = (id) => {
    return request({
      url: 'Supplier/del',
      method: 'get',
      params: {
        id: id
      }
    })
  }
  